package guava.basicUtils;

import com.google.common.base.Optional;

/**
 * <b> 描述:</b> ;<br/>
 *
 * @author <b>作者</b>cdxuhongya@jd.com
 *         <b>时间</b>2017/3/3 10:49<br/>
 *         <b>@CopyRight (c) </b>2015-京东智能版权所有<br/>
 */
public class OptionalTest {
    public static void main(String[] args) {
        Optional<Integer> optional = Optional.fromNullable(null);
        optional = optional.of(6);
        Boolean isExist = optional.isPresent();
       // optional.absent();
       // System.out.println(optional.orNull());
        System.out.println(optional.or(7));
    }
}
